import axios from "axios";

// 创建
const service = axios.create({
    baseURL:"https://api2.sparke.cn/",
    timeout:3000,
    headers:{
        "Content-Type":"application/json;charset=urf-8",
    }
    
})

// 2拦截器 发送数据到后台前的拦截
service.interceptors.request.use(
    config=>{
        return config;
    },
    error=>{
        console.log("axios中的request报错",error);
        Promise.reject(error)
    }
)
export default service;
